Skip to main content

All Questions

-2votes
2answers
12kviews

Difference between O(N^2) and Θ(N^2) [duplicate]

What is the difference between O(N^2) and Θ(N^2)? I know that O is the upper bound and Θ is tight bound. Could someone explain me this concept with an example.
Sgt. Foley's user avatar
11votes
5answers
918views

Programmaticaly finding the Landau notation (Big O or Theta notation) of an algorithm?

I'm used to search for the Landau (Big O, Theta...) notation of my algorithms by hand to make sure they are as optimized as they can be, but when the functions are getting really big and complex, it's ...
Julien L's user avatar
13votes
3answers
5kviews

Please explain the statement that the function an+b belongs to O(n^2) and Θ(n)?

Let's say I have a linear function f(n)= an+b, what is the best way to prove that this function belongs to O(n2) and Θ(n)? I do not need mathematical rigor here. I need a programmers answer. Some ...
Geek's user avatar
  • 5,217

close